USE [DeltaFlex]
GO
IF ( OBJECT_ID('dbo.sp_InsertarArticle') IS NOT NULL ) 
   DROP PROCEDURE dbo.sp_InsertarArticle
GO

CREATE PROCEDURE dbo.sp_InsertarArticle
					@REFERENCIAARTICLE nvarchar(50),
					@NOMARTICLE nvarchar(50),
					@UNITAT nvarchar(10),
					@PVP decimal(8,4) 
	     
AS 
BEGIN 
     SET NOCOUNT ON 

	 DECLARE @IDARTICLE int = NEXT VALUE FOR SEQ_ARTICLES;

     INSERT INTO ARTICLES(IDARTICLE, REFERENCIAARTICLE,NOMARTICLE,UNITAT,PVP)
				   VALUES(@IDARTICLE,@REFERENCIAARTICLE,@NOMARTICLE,@UNITAT,@PVP)

	END	
GO		